using System.Collections.Generic;
using Godot;

public class Zu : IEntity
{
    public List<Vector2I> GetNextPos(Game game, int team, Vector2I current)
    {
        var side = game.GetTeamSide(team);
        List<Vector2I> nextDir = [side == Side.Up ? Vector2I.Down : Vector2I.Up];
        List<Vector2I> ans = [];
        if (Rule.AtSide(side.Oppsite(), current.Y))
        {
            nextDir.AddRange([Vector2I.Left, Vector2I.Right]);
        }

        foreach (var dir in nextDir)
        {
            var next = current + dir;
            if (Rule.OnBoard(next.X, next.Y) && game.entitySlot[next.X, next.Y]?.team != team)
            {
                ans.Add(next);
            }
        }
        return ans;
    }
}